﻿#pragma once

#include "SysBase.h"

namespace Base {
	class PixelShader {
	public:
		PixelShader(const char* relativePath, const char* entry);

		/*void Bind(CBuffer<PsBuf0>* cbuf) const {
			auto ctx = Graphics::GetInstance()->GetDeviceContext();
			ctx->PSSetShader(m_pixelShader.Get(), nullptr, 0);
			ctx->PSSetConstantBuffers(1, 1, cbuf->GetX());
		}*/

		/*template<typename V>
		void Bind(CBuffer<V>* cbuf) const {
			auto ctx = Graphics::GetInstance()->GetDeviceContext();
			ctx->PSSetShader(m_pixelShader.Get(), nullptr, 0);
			ctx->PSSetConstantBuffers(1, 1, cbuf->GetDxConstantBufferPPtr());
		}*/

		ID3D11PixelShader* GetDxPixelShader()const {
			return m_pixelShader.Get();
		}


	private:

		void Init(const char* relativePath, const char* entry);

	private:
		ComPtr<ID3D11PixelShader> m_pixelShader;
		ComPtr<ID3DBlob> m_psBuffer;
	};
}
